﻿<%@ Page Language="C#"  MasterPageFile="~/MasterPage.master" AutoEventWireup="true"  MaintainScrollPositionOnPostback="true"
Inherits="Nivdal.Training" Title="" StylesheetTheme="SkinFile" Codebehind="Training.aspx.cs" %>

<%@ Register Assembly="obout_Flyout2_NET" Namespace="OboutInc.Flyout2" TagPrefix="cc1" %>
<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, Training_PageNameLabel %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="Head" ContentPlaceHolderID="HeadPlaceHolder" runat="server"> 

     <script type="text/javascript">




         function checkTotalTrainingTime() {
             
             var numberOfPlayer = parseInt(document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_NumberOfPlayers").value);

             var StaminaDropDownList = document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_StaminaDropDownList");
             var GlueDropDownList = document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_GlueDropDownList");
             var SetPiecesDropDownList = document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_SetPiecesDropDownList");
             var totalTime = 0;
             var totalTeamTrainingTime = 0;
             var totalPlayerTrainingTime = 0;
             var str1 = "ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_GridView1_";
             var Playerstr1 = "ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_GridView1_";
             var strHours1 = "_Hours1DropDownList";
             var strHours2 = "_Hours2DropDownList";
             var strPlayerTotal = "_PlayerTotalLabel";
             var PlayerTotalHighFlag = false;
             var PlayerTotalArray = new Array(numberOfPlayer);
             var j = 0;

             for (i = 2; i <= numberOfPlayer + 1; i++) {
                 if (i < 10) {
                     i = "0" + i;
                 }
                 
                 var str2 = "ctl" + i;
                 var Hours1DropDownList = str1 + str2 + strHours1;
                 var Hours2DropDownList = str1 + str2 + strHours2;
                 var Hours1 = document.getElementById(Hours1DropDownList).value;
                 var Hours2 = document.getElementById(Hours2DropDownList).value;
                 var Hours1Int = parseInt(Hours1);
                 var Hours2Int = parseInt(Hours2);

                 totalPlayerTrainingTime = Hours1Int + Hours2Int;
                 var PlayerTotal = Playerstr1 + str2 + strPlayerTotal;
                 //alert('PlayerTotal is: ' + PlayerTotal);
                 document.getElementById(PlayerTotal).firstChild.data = totalPlayerTrainingTime;
                 PlayerTotalArray[j] = 0; //initialize to false
                 //alert('PlayerTotalArray ' + i + PlayerTotalArray[i]);
                 if (totalPlayerTrainingTime > 6) {
                     document.getElementById(PlayerTotal).style.color = 'red';
                     PlayerTotalArray[j] = 1;
                    // alert('PlayerTotalArray ' + i + PlayerTotalArray[i]);
                 }
                 else{
                     document.getElementById(PlayerTotal).style.color = 'black';
                     
                 }
                   
                 totalTime = totalTime + Hours1Int + Hours2Int;
                 j++;

             }

             
             totalTime = totalTime + parseInt(StaminaDropDownList.value) + parseInt(GlueDropDownList.value) + parseInt(SetPiecesDropDownList.value);
             totalTeamTrainingTime = parseInt(StaminaDropDownList.value) + parseInt(GlueDropDownList.value) + parseInt(SetPiecesDropDownList.value);
             document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TotalHoursLabel").firstChild.data = totalTime;
             document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_TotalTeamHoursLabel").firstChild.data = totalTeamTrainingTime;

             if (totalTime > 40) {
                 document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TotalHoursLabel").style.color = 'red';
                 document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_SubmitButton").disabled = true;

             }
             else
                 document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TotalHoursLabel").style.color = 'black';

             
             if( totalTeamTrainingTime < 10 || totalTeamTrainingTime > 40 ) {
              document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_TotalTeamHoursLabel").style.color = 'red';
              document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_SubmitButton").disabled = true;

             }
             else
                 document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_TotalTeamHoursLabel").style.color = 'black';
                                  

            for (i = 0; i <= numberOfPlayer + 1 ; i++) {
                if (PlayerTotalArray[i] == 1) {
                    
                    document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_SubmitButton").disabled = true;
                    PlayerTotalHighFlag = true;
                    break;
                }
                else
                    PlayerTotalHighFlag = false;

            }

             if (totalTime <= 40 && totalTeamTrainingTime >= 10 && PlayerTotalHighFlag == false)  
                 document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_SubmitButton").disabled = false;



         }

         function CleanTrainingHours() {
             var numberOfPlayer = parseInt(document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_NumberOfPlayers").value);
             document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_StaminaDropDownList").value = 0;
             document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_GlueDropDownList").value = 0;
             document.getElementById("ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_TeamDetailsFormView_SetPiecesDropDownList").value = 0;
             var str1 = "ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_GridView1_";
             var Playerstr1 = "ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_GridView1_";
             var strHours1 = "_Hours1DropDownList";
             var strHours2 = "_Hours2DropDownList";
             var Training1DDLName = "_Training1DropDownList";
             var Training2DDLName = "_Training2DropDownList";
             var PlayerTotalArray = new Array(numberOfPlayer);
             var str2;
             var Hours1DropDownList;
             var Hours2DropDownList;
             var Training1DDL;
             var Training2DDL;
             
             for (i = 2; i <= numberOfPlayer + 1; i++) {
                 
                 if (i < 10) {
                     i = "0" + i;
                 }
                 
                 str2 = str2 = "ctl" + i;
                 Hours1DropDownList = str1 + str2 + strHours1;
                 Hours2DropDownList = str1 + str2 + strHours2;
                 Training1DDL = str1 + str2 + Training1DDLName;
                 Training2DDL = str1 + str2 + Training2DDLName;
                 

                 document.getElementById(Hours1DropDownList).value = 0;
                 document.getElementById(Hours2DropDownList).value = 0;
                 document.getElementById(Training1DDL).value = 0;
                 document.getElementById(Training2DDL).value = 0;        
                 
             }

             checkTotalTrainingTime()             
         }
</script>
       
    
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:HiddenField runat="server" ID="NumberOfPlayers" Value= "0" />
    <div class="basic_element">
    <asp:Label ID="CoachMessageLabel" runat="server" Text="" SkinID="ConfirmLabel"></asp:Label>
    <div class="red_title">
        <asp:Label ID="TopTitleLabel" runat="server" CssClass="white_title" Text="<%$ Resources:Resource, Training_PageNameLabel %>"></asp:Label>
    </div>
    <div class="padding5">
        <asp:LinkButton ID="GetFreeCoachButton" runat="server" Text="<%$ Resources:Resource, Training_GetCoachForFree %>" Visible="false"
         ToolTip="<%$ Resources:Resource, Training_GetCoachForFreeToolTip %>" SkinID="GreenTitleLink" OnClick="GetFreeCoach"></asp:LinkButton>
        <table style="width:100%;">
        <tr>
            <td style="vertical-align:top; width:15%;">                
                <asp:Image ID="TrainingImage" runat="server" ImageUrl="~/Images/Hypo/Secretary4.png" Height="100" Width="120" />                
            </td>
            <td style="vertical-align:top; width:50%;">
                <asp:Label ID="CoachDetailsLabel" runat="server" Text="<%$ Resources:Resource, Global_Coach %>" Visible="False" SkinID="InfoLabel"></asp:Label>
                
                <asp:FormView ID="SubjectFormView" runat="server" DataSourceID="GetCoachDetailsSqlDataSource" Visible="false">
                    <ItemTemplate>
                        <asp:HyperLink ID="LinkButton1" runat="server" Text='<%# Bind("Name") %>' NavigateUrl='<%# Eval("Id", "coach.aspx?Id={0}") %>'
                            SkinID="GreenTitleHyperLink"></asp:HyperLink>
                        <asp:ImageButton ID="FlagImageButton" runat="server" PostBackUrl='<%# Eval("Id", "country.aspx?CountryId={0}") %>'
                         ToolTip='<%# Bind("CountryName") %>' ImageUrl='<%# Eval("Flag", "~/Images/Flags/{0}") %>'/>
                        <br />
                        <asp:Label ID="LevelTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Level %>" SkinID="InfoLabel"></asp:Label>
                        <asp:Label ID="LevelLabel" runat="server" Text='<%# Eval("[Level]") %>' SkinID="GridLabel" />
                    </ItemTemplate>
                </asp:FormView>
                <br />
                <asp:FormView ID="CurrentTeamValues" runat="server" DataSourceID="GetCurrentTeamGlueAndSPDataSourse">
                    <ItemTemplate>
                        <asp:Label ID="CurrentTeamGlueTitleLabel" runat="server" Text="<%$ Resources:Resource, Training_CurrentTeamGlueTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                        <asp:Label ID="CurrentTeamGlueLabel" runat="server" Text='<%# Eval("Glue") %>' SkinID="GridLabel"></asp:Label>
                        <br />
                        <asp:Label ID="CurrentSerPiecesTitleLabel" runat="server" Text="<%$ Resources:Resource, Training_CurrentSerPiecesTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                        <asp:Label ID="CurrentSerPiecesLabel" runat="server" Text='<%# Eval("SetPieces") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>               
                </asp:FormView> 
                <asp:Label ID="NextTrainingTitleLabel" runat="server" Text="<%$ Resources:Resource, Training_NextTrainingTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                <asp:Label ID="NextTrainingLabel" runat="server" SkinID="GridLabel"></asp:Label>           
            </td>
        </tr>
        <tr>
            <td colspan="2">    
                 <asp:HyperLink ID="TrainingReportsHyperLink" runat="server" SkinID="GreenTitleHyperLink" 
                Text="<%$ Resources:Resource, Training_TrainingReportsHyperLink %>" NavigateUrl="~/TrainingReports.aspx"></asp:HyperLink>
                <br />
                <asp:HyperLink ID="SearchCoachButton" runat="server" Text="<%$ Resources:Resource, Training_SearchCoachButton %>" SkinID="GreenTitleHyperLink"
                  NavigateUrl="SearchForCoach.aspx" ></asp:HyperLink>
                <asp:HyperLink ID="RedSearchCoachButton" runat="server" Text="<%$ Resources:Resource, Training_RedSearchCoachButton %>" SkinID="GreenTitleHyperLink"
                  NavigateUrl="SearchForCoach.aspx" ToolTip = "<%$ Resources:Resource, Training_RedSearchCoachButtonToolTip %>" ></asp:HyperLink>
                
           </td>            
        </tr>
        </table>
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="TeamTrainingDetailsLabel" runat="server" Text="<%$ Resources:Resource, Training_TeamTrainingDetailsLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:FormView ID="TeamDetailsFormView" runat="server" DataSourceID="TeamDetailsSqlDataSource">
        <ItemTemplate>
            <table>
            <tr>
            <td>
            <asp:Label ID="StaminaDropDownListTitle" runat="server" Text='<%# Resources.Resource.Global_Stamina+ ":"%>' SkinID="SmallHeaderLabel"></asp:Label>
            </td>
            <td>
            <asp:DropDownList ID="StaminaDropDownList" OnChange="checkTotalTrainingTime();" SelectedValue='<%# Bind("Stamina") %>'
                runat="server">
                <asp:ListItem>0</asp:ListItem>
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>6</asp:ListItem>
                <asp:ListItem>7</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
                <asp:ListItem>9</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>11</asp:ListItem>
                <asp:ListItem>12</asp:ListItem>
                <asp:ListItem>13</asp:ListItem>
                <asp:ListItem>14</asp:ListItem>
                <asp:ListItem>15</asp:ListItem>
                <asp:ListItem>16</asp:ListItem>
                <asp:ListItem>17</asp:ListItem>
                <asp:ListItem>18</asp:ListItem>
                <asp:ListItem>19</asp:ListItem>
                <asp:ListItem>20</asp:ListItem>
                <asp:ListItem>21</asp:ListItem>
                <asp:ListItem>22</asp:ListItem>
                <asp:ListItem>23</asp:ListItem>
                <asp:ListItem>24</asp:ListItem>
                <asp:ListItem>25</asp:ListItem>
                <asp:ListItem>26</asp:ListItem>
                <asp:ListItem>27</asp:ListItem>
                <asp:ListItem>28</asp:ListItem>
                <asp:ListItem>29</asp:ListItem>
                <asp:ListItem>30</asp:ListItem>
                <asp:ListItem>31</asp:ListItem>
                <asp:ListItem>32</asp:ListItem>
                <asp:ListItem>33</asp:ListItem>
                <asp:ListItem>34</asp:ListItem>
                <asp:ListItem>35</asp:ListItem>
                <asp:ListItem>36</asp:ListItem>
                <asp:ListItem>37</asp:ListItem>
                <asp:ListItem>38</asp:ListItem>
                <asp:ListItem>39</asp:ListItem>
                <asp:ListItem>40</asp:ListItem>
            </asp:DropDownList>
            </td>
            </tr>
            <tr>
            <td>
            <asp:Label ID="GlueDropDownListTitleLabel" runat="server" Text="<%$ Resources:Resource, Training_GlueDropDownListTitleLabel %>" SkinID="SmallHeaderLabel"></asp:Label>
            </td>
            <td>
            <asp:DropDownList ID="GlueDropDownList" OnChange="checkTotalTrainingTime();" SelectedValue='<%# Bind("Glue") %>' runat="server">
                <asp:ListItem>0</asp:ListItem>
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>6</asp:ListItem>
                <asp:ListItem>7</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
                <asp:ListItem>9</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>11</asp:ListItem>
                <asp:ListItem>12</asp:ListItem>
                <asp:ListItem>13</asp:ListItem>
                <asp:ListItem>14</asp:ListItem>
                <asp:ListItem>15</asp:ListItem>
                <asp:ListItem>16</asp:ListItem>
                <asp:ListItem>17</asp:ListItem>
                <asp:ListItem>18</asp:ListItem>
                <asp:ListItem>19</asp:ListItem>
                <asp:ListItem>20</asp:ListItem>
                <asp:ListItem>21</asp:ListItem>
                <asp:ListItem>22</asp:ListItem>
                <asp:ListItem>23</asp:ListItem>
                <asp:ListItem>24</asp:ListItem>
                <asp:ListItem>25</asp:ListItem>
                <asp:ListItem>26</asp:ListItem>
                <asp:ListItem>27</asp:ListItem>
                <asp:ListItem>28</asp:ListItem>
                <asp:ListItem>29</asp:ListItem>
                <asp:ListItem>30</asp:ListItem>
                <asp:ListItem>31</asp:ListItem>
                <asp:ListItem>32</asp:ListItem>
                <asp:ListItem>33</asp:ListItem>
                <asp:ListItem>34</asp:ListItem>
                <asp:ListItem>35</asp:ListItem>
                <asp:ListItem>36</asp:ListItem>
                <asp:ListItem>37</asp:ListItem>
                <asp:ListItem>38</asp:ListItem>
                <asp:ListItem>39</asp:ListItem>
                <asp:ListItem>40</asp:ListItem>
            </asp:DropDownList>
            </td>
            </tr>
            <tr>
            <td>
            <asp:Label ID="SetPiecesDropDownListTitleLabel" runat="server" Text="<%$ Resources:Resource, Training_SetPiecesDropDownListTitleLabel %>" SkinID="SmallHeaderLabel"></asp:Label>
            </td>
            <td>
            <asp:DropDownList ID="SetPiecesDropDownList" OnChange="checkTotalTrainingTime();" SelectedValue='<%# Bind("SetPieces") %>' runat="server">
                <asp:ListItem>0</asp:ListItem>
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>6</asp:ListItem>
                <asp:ListItem>7</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
                <asp:ListItem>9</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>11</asp:ListItem>
                <asp:ListItem>12</asp:ListItem>
                <asp:ListItem>13</asp:ListItem>
                <asp:ListItem>14</asp:ListItem>
                <asp:ListItem>15</asp:ListItem>
                <asp:ListItem>16</asp:ListItem>
                <asp:ListItem>17</asp:ListItem>
                <asp:ListItem>18</asp:ListItem>
                <asp:ListItem>19</asp:ListItem>
                <asp:ListItem>20</asp:ListItem>
                <asp:ListItem>21</asp:ListItem>
                <asp:ListItem>22</asp:ListItem>
                <asp:ListItem>23</asp:ListItem>
                <asp:ListItem>24</asp:ListItem>
                <asp:ListItem>25</asp:ListItem>
                <asp:ListItem>26</asp:ListItem>
                <asp:ListItem>27</asp:ListItem>
                <asp:ListItem>28</asp:ListItem>
                <asp:ListItem>29</asp:ListItem>
                <asp:ListItem>30</asp:ListItem>
                <asp:ListItem>31</asp:ListItem>
                <asp:ListItem>32</asp:ListItem>
                <asp:ListItem>33</asp:ListItem>
                <asp:ListItem>34</asp:ListItem>
                <asp:ListItem>35</asp:ListItem>
                <asp:ListItem>36</asp:ListItem>
                <asp:ListItem>37</asp:ListItem>
                <asp:ListItem>38</asp:ListItem>
                <asp:ListItem>39</asp:ListItem>
                <asp:ListItem>40</asp:ListItem>
            </asp:DropDownList>
            </td>
            </tr>
            <tr>
            <td colspan="2">
            <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Resource, Training_TotalTeamHoursLabel %>" SkinID="InfoLabel"></asp:Label>
            <asp:Label ID="TotalTeamHoursLabel" runat="server" SkinID="TeamNameLabel"
            Text='<%# int.Parse(Eval("SetPieces").ToString()) + int.Parse(Eval("Glue").ToString()) + int.Parse(Eval("Stamina").ToString()) %>' ></asp:Label>
            </td>
            </tr>
        </table>
        </ItemTemplate>
    </asp:FormView>

    <asp:Label ID="TotlaHoursTitleLabel" runat="server" Text="<%$ Resources:Resource, Training_TotalHours %>" SkinID="InfoLabel"></asp:Label>
    <asp:Label ID="TotalHoursLabel" runat="server" SkinID="TeamNameLabel"></asp:Label>   
    <br /><br /> 
    <asp:Button ID="CleanButton" runat="server" Text="<%$ Resources:Resource, Training_ClearButtonText %>" 
     CssClass="GreySmallButtonStyle" OnClientClick="javascript:CleanTrainingHours(); return false;"   /> 
    <br /><br />
    <asp:Button ID="SubmitButton" runat="server" Text="<%$ Resources:Resource, Global_Submit %>" CssClass="GreenButtonTextStyle"
        onclick="SubmitButton_Click" ValidationGroup="TrainingValidation" />
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="IndividualLabel" runat="server" Text="<%$ Resources:Resource, Training_IndividualLabel %>" CssClass="white_title" ></asp:Label>
    </div>
    <div class="padding5">
        <asp:GridView ID="GridView1" DataSourceID="TrainingGetCurentPlayerInstructionsSqlDataSource"
            SkinID="Professional" AutoGenerateColumns="False" Font-Size="13px" EnableTheming="True"
            runat="server">
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Player %>">
                    <ItemTemplate>
                        <asp:Label ID="ShirtNumLabel" runat="server" Text='<%# Eval("ShirtNum") %>' SkinID="GridLabel"></asp:Label>
                        <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("PlayerName") %>' 
                        NavigateUrl='<%# Eval("PlayerId", "Player.aspx?Id={0}") %>'
                        SkinID="BlackHyperLinkSkin" ></asp:HyperLink>
                        <asp:Image ID="PrivateNoteImage" runat="server" ImageUrl="~/Images/Icons/PrivateNote.png" Visible='<%# Eval("PrivateNote").ToString().Length > 0 %>' />
                        <cc1:Flyout ID="PrivateNoteFlyout" runat="server" Visible='<%# Eval("PrivateNote").ToString().Length > 0 %>'
                         AttachTo="PrivateNoteImage" NoneEffect="true">
                            <div class="ToolTipStyle">
                                <asp:Label ID="PrivateNoteLabel" runat="server" Text='<%# Eval("PrivateNote").ToString().Replace("\r\n", " <br />").Replace("\n", " <br />") %>'></asp:Label>                        
                            </div>
                        </cc1:Flyout>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/question.gif" />                    
                        <cc1:Flyout ID="Flyout1" runat="server" AttachTo="Image1" Align="LEFT" Position="MIDDLE_RIGHT" FadingEffect="true">
                            <div class="ToolTipStyle" >
                                <%# Eval("ToolTip") %>
                            </div>                    
                        </cc1:Flyout>                    
                    
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_PlayerId %>" Visible ="false">
                     <ItemTemplate>
                         <asp:Label ID="PlayerIdLabel" runat="server" Text='<%# Bind("PlayerId") %>'  Visible="True"></asp:Label> 
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Training_Training1IdHeaderText %>">
                    <ItemTemplate>
                        <asp:DropDownList ID="Training1DropDownList" SelectedValue='<%# Bind("Training1Id") %>' Enabled="True"
                            AppendDataBoundItems="true" DataSourceID="ShowPlayerAttributeValuesSqlDataSource"
                            DataTextField="AttributeName" DataValueField="AttributeId" runat="server">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Hours %>">
                    <ItemTemplate>
                        <asp:DropDownList ID="Hours1DropDownList" SelectedValue='<%# Bind("Training1time") %>'  OnChange="checkTotalTrainingTime();"   runat="server">
                            <asp:ListItem>0</asp:ListItem>
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                            <asp:ListItem>5</asp:ListItem>
                            <asp:ListItem>6</asp:ListItem>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Training_Training2IdHeaderText %>" >
                    <ItemTemplate>
                        <asp:DropDownList ID="Training2DropDownList" SelectedValue='<%# Bind("Training2Id") %>' Enabled="True"
                            AppendDataBoundItems="true" DataSourceID="ShowPlayerAttributeValuesSqlDataSource"
                            DataTextField="AttributeName" DataValueField="AttributeId" runat="server">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Hours %>" >
                    <ItemTemplate>
                        <asp:DropDownList ID="Hours2DropDownList" OnChange="checkTotalTrainingTime();" SelectedValue='<%# Bind("Training2time") %>'  runat="server">
                            <asp:ListItem>0</asp:ListItem>
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                            <asp:ListItem>5</asp:ListItem>
                            <asp:ListItem>6</asp:ListItem>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Training_TotalPlayerHoursHeader %>">
                    <ItemTemplate>
                        <asp:Label ID="PlayerTotalLabel" runat="server" Text='<%# int.Parse(Eval("Training1time").ToString()) + int.Parse(Eval("Training2time").ToString()) %>'></asp:Label>
                    </ItemTemplate>                
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </div>    
    

    <asp:SqlDataSource ID="GetCoachDetailsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_TrainingShowCoachDetails" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TeamDetailsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_TrainingGetCurentTeamInstructions" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TrainingGetCurentPlayerInstructionsSqlDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Nivdal_TrainingGetCurentPlayerInstructions"
        SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    <asp:SqlDataSource ID="ShowPlayerAttributeValuesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_ShowPlayerAttributeValues" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="GetCurrentTeamGlueAndSPDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_TrainingGetTeamGlueAndSetPieces" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
</asp:Content>
